import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMethod;

import com.fimuz.mqmeet.api.login.control.submitMethodU;
import com.fimuz.mqmeet.helper.utils.SessionUtils;


//${serviceNameU}Service.java
	public ${methodNameU}SrModel ${methodName}(${methodNameU}SpModel spModel);
	
//${serviceNameU}ServiceImpl.java
	@Override
	public ${methodNameU}SrModel ${methodName}(${methodNameU}SpModel spModel) {
		${methodNameU}SrModel srModel = new ${methodNameU}SrModel();
		//srModel.setDatas(${serviceName}Dao.${methodName}(spModel));
		//srModel.setTotalCount(${serviceName}Dao.${methodName}Count(spModel));
		return srModel;
	}
	
//${serviceNameU}Control.java
	/**
	 * http://127.0.0.1:8080/${projectWar}/api/${serviceName}/${methodName}
	 * <#if submitMethodU == "POST">{"":"","":""}</#if>
	 * @param request
	 * @param spModel
	 * @return
	 */	
	@RequestMapping(value = "/api/${serviceName}/${methodName}",method = RequestMethod.${submitMethodU})
	public ${methodNameU}SrModel ${methodName}(HttpServletRequest request,<#if submitMethodU == "POST">@RequestBody</#if> ${methodNameU}SpModel spModel) {
		//SessionUtils.fillSpModel(request, spModel);
		${methodNameU}SrModel srModel = ${serviceName}Service.${methodName}(spModel);
		return srModel;
	}
	
//${serviceNameU}Mapper.xml
	<select id="${methodName}"
			parameterType="${packageName}.api.${serviceName}.service.model.${methodNameU}SpModel"
			resultType="${packageName}.api.${serviceName}.service.model.${methodNameU}SrModel$Datas">
			SELECT 
			  t1.`id`,
			FROM
			  `xxx` t1
			WHERE 1 = 1 
			<if test="null != buildingregionId and '' != buildingregionId">
				and t1.id={buildingregionId} 
			</if>			  
			AND t1.`is_deleted` = '0'   
			limit {offset},{size}
	</select>		